home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / cvcord.z / cvcord
Text File  |  1998-10-30  |  16KB  |  330 lines

  1.  
  2.  
  3.  
  4. CCCCVVVVCCCCOOOORRRRDDDD((((1111))))                                                            CCCCVVVVCCCCOOOORRRRDDDD((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      cvcord - explore working set behavior and generate cord feedback files
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ccccvvvvccccoooorrrrdddd ----LLLL _e_x_e_c_u_t_a_b_l_e [[[[----ffffbbbb <_f_e_e_d_b_a_c_k-_f_i_l_e-_n_a_m_e>]]]] [[[[----wwwwssssllll <_w_s-_l_i_s_t-_f_i_l_e>]]]]
  13.      [[[[----wwwwssss <<<<_a_n_a_l_y_s_i_s>>>>]]]] [[[[----sssscccchhhheeeemmmmeeee _s_c_h_e_m_e_N_a_m_e]]]]
  14.  
  15. IIIINNNNTTTTRRRROOOODDDDUUUUCCCCTTTTIIIIOOOONNNN
  16.      _c_v_c_o_r_d is a tool designed to allow a user to explore the working set
  17.      behavior of an executable or shared library (DSO), and to construct a
  18.      feedback file for use by _c_o_r_d to generate an executable with improved
  19.      working-set behavior.
  20.  
  21.      The premise for this tool is as follows: when application and/or DSOs
  22.      execute, they bring in pages from their instructions (text) as needed to
  23.      execute the chain of functions triggered by any operation.  By recording
  24.      a WorkShop Performance Experiment, and capturing ideal-time data for
  25.      samples that demarcate each operation, the user can generate working-set
  26.      files, each listing all the functions that were executed for the
  27.      operation whose beginning and end are delineated by the caliper setting.
  28.      These files are written in response to a menu operation on the Working
  29.      Set View of _c_v_p_e_r_f.  _c_v_c_o_r_d then analyzes a list of such working-set
  30.      files, and uses them to generate an ordering to minimize the working-sets
  31.      for each operation, and to minimize the transitions in working-set
  32.      between operations.
  33.  
  34.      In order to construct a cording, the user first records one or more
  35.      ideal-time experiments for the executable or DSO, taking samples at
  36.      appropriate points to demarcate the desired operations.  The more
  37.      carefully the sample points are chosen for important operations, and the
  38.      more complete the set of defined operations for which data is collected,
  39.      the better the ordering should be.
  40.  
  41.      Then the user invokes _c_v_p_e_r_f on any one such experiment, and generates a
  42.      single so-called cord mapping file (from the ``Save Cord Map File'' menu
  43.      entry on the Working Set View).  The file should be generated from an
  44.      experiment using the executable or DSO version corresponding to the
  45.      version that is to be cord'ed.
  46.  
  47.      The user then proceeds to generate any number of working-set files from
  48.      one or more of the experiments.  Unlike the mapping file, the working-set
  49.      files may be generated using different versions of the executable or DSO;
  50.      one assumption of this method is that while program versions may change,
  51.      the list of functions for an operation changes much less frequently.
  52.  
  53.      The user then prepares a working-set-list file, with one line per
  54.      working-set, and invokes _c_v_c_o_r_d, giving it the executable or DSO name,
  55.      the cord mapping file, and the working-set-list file.  Using _c_v_c_o_r_d, the
  56.      user can generate additional working-set files as unions or intersections
  57.      of selected groups of existing sets.  The strategy for deciding which
  58.      such combinations to make, and why is based on the following.  Unions are
  59.      typically used when cord'ing libraries; they are generated when there are
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CCCCVVVVCCCCOOOORRRRDDDD((((1111))))                                                            CCCCVVVVCCCCOOOORRRRDDDD((((1111))))
  71.  
  72.  
  73.  
  74.      a number of different working sets that cover what is believed to be
  75.      similar functionality.  The union set is generated, and given higher
  76.      priority than any of the individual component working sets.
  77.      Intersections are much less frequently used; the most common case where
  78.      an intersection might be useful is to ensure that functionality common to
  79.      two or more working sets is represented as such.  The intersection set is
  80.      generated, and then given higher priority than the components that went
  81.      into it.
  82.  
  83.      Eventually, the _c_v_c_o_r_d user-interface will allow manual rearrangement of
  84.      the list; for now, it does not, and the user should invoke the ``Save
  85.      Working Set List'' menu item of _c_v_c_o_r_d to save a new list with the
  86.      additional union or intersection sets included.  Then, exit _c_v_c_o_r_d, and
  87.      edit the list by hand in order to have the working-sets in the list in
  88.      priority order.  The list of working sets should be prioritized from
  89.      bottom to top, with the least important set appearing first, and the most
  90.      important set appearing last.
  91.  
  92.      The criteria for prioritization is quite subjective.  If you want the
  93.      initial startup of your program to be fast, giving the appearance of
  94.      rapid response, put the working set for the startup as the bottom entry
  95.      in the list, and then order the others from least-important operation to
  96.      most-important.
  97.  
  98.      When the ordered working-set list file is ready, the user reinvokes
  99.      _c_v_c_o_r_d with the same executable and cord mapping, and the newly
  100.      prioritized working-set-list.  The user then invokes the ``Construct
  101.      Cording Feedback'' menu item to generate a new cord feedback file, which
  102.      is then used directly by _c_o_r_d to rearrange the executable or DSO.  The
  103.      algorithm used attempts to find as many distinct affinity-sets as it can,
  104.      and to order them to minimize the working sets for the operations in
  105.      their priority order.
  106.  
  107.      During these operations, the _c_v_c_o_r_d may be used to examine the page
  108.      layout and efficiency of each working-set with respect to the original
  109.      cording, a newly constructed cording, or an alternate cord feedback file
  110.      that can be read in to replace the current one.  The interface is
  111.      described below.
  112.  
  113. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  114.      _c_v_c_o_r_d reads a feedback file specified by the -fb argument, or generated
  115.      by default from the executable name (_e_x_e_c_u_t_a_b_l_e._f_b), and an optional
  116.      working-set or working-set-list file.  It then shows the list of working
  117.      sets, and a page map for a selected working set, and allows for
  118.      operations to construct union or intersection combinations of existing
  119.      sets, to construct a cord ordering, or to save a working-set-list file.
  120.  
  121. CCCCOOOOMMMMMMMMAAAANNNNDDDD----LLLLIIIINNNNEEEE OOOOPPPPTTTTIIIIOOOONNNNSSSS
  122.      _c_v_c_o_r_d accepts the following command-line options:
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CCCCVVVVCCCCOOOORRRRDDDD((((1111))))                                                            CCCCVVVVCCCCOOOORRRRDDDD((((1111))))
  137.  
  138.  
  139.  
  140.      ----LLLL _e_x_e_c_u_t_a_b_l_e
  141.           specifies a single executable file name as input.
  142.  
  143.      ----ffffbbbb _f_e_e_d_b_a_c_k
  144.           specifies a single text file to use as a feedback file for the
  145.           executable.  It should have been generated either from a _c_v_p_e_r_f
  146.           experiment on the executable or DSO, or from _c_v_c_o_r_d.  If no -_f_b
  147.           argument is given, the feedback file name will be generated as
  148.           _e_x_e_c_u_t_a_b_l_e._f_b.
  149.  
  150.      ----wwwwssssllll _f_i_l_e_s_e_t
  151.           specifies a single text file name as input; the working set list
  152.           will consist of the working-set files whose names appear in the
  153.           input file.  Each file name should be on a single line.
  154.  
  155.      ----wwwwssss _f_i_l_e
  156.           specifies a single working-set file name.
  157.  
  158.      ----sssscccchhhheeeemmmmeeee _s_c_h_e_m_e_N_a_m_e
  159.           specifies which color scheme should be used for _c_v_c_o_r_d.
  160.  
  161. XXXX RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS
  162.      _c_v_c_o_r_d uses many resources to control its user interface, most of which
  163.      should not be changed by the user.  Those that a user might want to
  164.      change are:
  165.  
  166.      ccccvvvvccccoooorrrrdddd****aaaassssssssuuuummmmeeeeddddPPPPaaaaggggeeeeSSSSiiiizzzzeeee
  167.           specifies the size of pages to be used for _c_v_c_o_r_d's computations.
  168.           It defaults to the page size on the machine on which it is running.
  169.  
  170.      ccccvvvvccccoooorrrrdddd****sssscccchhhheeeemmmmeeee
  171.           specifies the color and font scheme to be used for _c_v_c_o_r_d.
  172.  
  173.      ccccvvvvccccoooorrrrdddd****uuuusssseeeeSSSSmmmmaaaallllllllFFFFoooonnnnttttssss
  174.           specifies that small fonts are to be used for _c_v_c_o_r_d in order to
  175.           better use screen real-estate.  It defaults to False.
  176.  
  177. UUUUSSSSEEEERRRR IIIINNNNTTTTEEEERRRRFFFFAAAACCCCEEEE
  178.      _c_v_c_o_r_d initially comes up with a menu bar, a status area, a working-set
  179.      list pane, a control region, and a working-set page map pane.  It has an
  180.      additional window that may be invoked, the function list window.
  181.  
  182.    MMMMEEEENNNNUUUU BBBBAAAARRRR
  183.      The ``Admin'' menu has entries to save a summary of the data for the
  184.      current working set list, to iconify or raise the windows of the Cord
  185.      Analyzer View, or to exit the tool.  It also has a ``Launch Tool''
  186.      submenu that will launch the other WorkShop tools, and a ``Project'' menu
  187.      that will raise or iconify all windows in all tools within the project,
  188.      or exit all tools in the project.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CCCCVVVVCCCCOOOORRRRDDDD((((1111))))                                                            CCCCVVVVCCCCOOOORRRRDDDD((((1111))))
  203.  
  204.  
  205.  
  206.      The ``File'' menu allows the user to add or delete working sets from the
  207.      list; to construct a cording order from the working sets; and to
  208.      construct a union and/or intersection set from the sets that are selected
  209.      at the time the menu item is selected; and to replace the current cord
  210.      ordering with one read from a feedback file.
  211.  
  212.      The ``Help'' menu is used to access on-line help for _c_v_c_o_r_d.
  213.  
  214.    TTTTHHHHEEEE SSSSTTTTAAAATTTTUUUUSSSS AAAARRRREEEEAAAA
  215.      The status area is used to inform the user of the current status of the
  216.      program, as well as to describe any performance experiment that is in the
  217.      current project.
  218.  
  219.    TTTTHHHHEEEE WWWWOOOORRRRKKKKIIIINNNNGGGG SSSSEEEETTTT LLLLIIIISSSSTTTT
  220.      The upper subpane in the main window is the Working Set List.  It
  221.      contains a scrolled list of all the working sets in the files belonging
  222.      to the set, with information about the page count computed with the
  223.      current ordering, and minimum page count for each working set.  In
  224.      addition, if a function is selected, a + sign at the beginning of the
  225.      line indicates that the selected function is used in the set.
  226.  
  227.      A set may be selected by double-clicking on the line in the Working Set
  228.      List showing that set.  The ``Next Set'' and ``Previous Set'' buttons may
  229.      be used to step forwards and backwards through the list.  If no loop is
  230.      selected, the ``Next Set'' and ``Previous Set'' buttons will select the
  231.      first set on the list.  The selected set will be used to mark those
  232.      functions in the Function List Window that were referenced in the
  233.      working-set.
  234.  
  235.    TTTTHHHHEEEE CCCCOOOONNNNTTTTRRRROOOOLLLL AAAARRRREEEEAAAA
  236.      The control area contains a search field to find a set based on any
  237.      string appearing in its line, and a row of buttons.  The search field is
  238.      on the left side of the control area.  Three buttons appear on the right:
  239.      one to invoke the function list, and two buttons to step forwards and
  240.      backwards through the working-set list.
  241.  
  242.    TTTTHHHHEEEE WWWWOOOORRRRKKKKIIIINNNNGGGG SSSSEEEETTTT PPPPAAAAGGGGEEEE MMMMAAAAPPPP PPPPAAAANNNNEEEE
  243.      The lower subpane of the main window is the Working Set Page Map Pane.
  244.      It has several information lines, below which is a colored map of the
  245.      pages in the executable.  The information lines show detailed information
  246.      for the selected set from the Loop List, and any selected page.
  247.  
  248.      The block area for each page in the executable or DSO, is colored to
  249.      represent the fraction of instructions on that page belonging to
  250.      functions that were executed within the selected working-set (dark blue),
  251.      the fraction of instructions belonging to functions that were not
  252.      executed (red), and the fraction of word that either contain table-data
  253.      or represent the tail-end of the last page (bright blue).  If any page
  254.      has no executed functions on it, it is shown in green.  A page may be
  255.      selected by clicking on it; it will be drawn with a heavy outline, and
  256.      statistics about it will be shown above the map.
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. CCCCVVVVCCCCOOOORRRRDDDD((((1111))))                                                            CCCCVVVVCCCCOOOORRRRDDDD((((1111))))
  269.  
  270.  
  271.  
  272.    TTTTHHHHEEEE FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN LLLLIIIISSSSTTTT WWWWIIIINNNNDDDDOOOOWWWW
  273.      The Funtion List Window is brought up by the ``Show Function List''
  274.      button.  It consists of a scrolled list of all the functions contained in
  275.      the executable or DSO, in the order given by the last cord feedback file
  276.      read in or generated.  Each function is shown with a count of the number
  277.      of working-sets in which it appears, its size, its address, and its name.
  278.      If the function is used within the current selected set, a + sign will
  279.      appear at the beginning of its line.
  280.  
  281.      Double clicking on a line in this view will select the function, and set
  282.      the indicators for the function's use on the working-set list.
  283.  
  284. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  285.      cvd(1), cvperf(1), cord(1)
  286.  
  287. BBBBUUUUGGGGSSSS
  288.      No method is available for reordering the working-sets through the UI.
  289.      No method is available to hand-order the functions to produce a feedback
  290.      file.
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                                                                         PPPPaaaaggggeeee 5555
  325.  
  326.  
  327.  
  328.